const code : { [key : string] : number } = {
    API_SUCCESS: 0,
    REQUEST_FAIL: 4444, //请求失败
    TOKEN_MISS: 1001, //缺少token
    TOKEN_EXPIRE: 10002,
    TOKEN_ERROR: 10003,
    REGISTER_USERNAME_EXISTED: 1105,
    RECORD_GET_FAIL: 1106, //数据获取失败
    LOGIN_APP_ID_NOT_FOUND: 1111,
    LOGIN_USER_DISABLED: 1112,
    STORE_NOT_EXIST: 1202,
    CAPTCHA_INCORRECT: 10005,
    SERVER_SUCCESS: 200,
    SERVER_BAD_REQUEST: 400,
    SERVER_UNAUTHORIZED: 401,
    SERVER_FORBIDDEN: 403,
    SERVER_NOT_FOUND: 404,
    SERVER_ERROR: 500,
    SERVER_BAD_GATEWAY: 502,
    SERVER_UNAVAILABLE: 503,
    SERVER_GATEWAY_TIMEOUT: 504,
    CLIENT_REQUEST_TIMEOUT: 5005,//客户端请求超时
    PARAM_VALID_FAIL: 4222, //请求参数验证失败
    VERIFIY_CODE_EXPIRED: 10009,//验证码过期
    USER_NOT_REGISTERD: 42238, //用户未注册
    PHONE_INCORRECT: 42239, //手机号不正确
    REQUEST_TOO_MANY_ATTEMPTS: 1600, //请求太频繁
    CLIENT_ERROR: 5000,//客户端错误
    //订单状态
    STATUS_IN_PROCESS: 1, //进行中
    STATUS_COMPLETED: 2, //已完成
    STATUS_CLOSED: 3, //已关闭
    IN_PROCESS_PENDING_PAYMENT: 1, //待支付
    IN_PROCESS_PENDING: 2, //支付确认中
    IN_PROCESS_PAYMENT_RECEIVED: 3, //已收到付款
    IN_PROCESS_IN_WAREHOUSE: 4, //备货中
    IN_PROCESS_PROCESSED: 5, //已打包(待发货)
    IN_PROCESS_SHIPPED: 6, //已寄送(配送中)
    //退款状态
    REFUND_REQUEST: 1, //申请
    REFUND_CANCEL: 2, //撤销
    REFUND_AGREE: 3, //同意
    REFUND_REFUSE: 4, //拒绝
    ORDER_REFUSE: 5, //商家拒绝订单
    //审核常量
    REVIEW_READY: 1,
    REVIEW_SUCCESS: 2,
    REVIEW_FAIL: 3,
    REVIEW_CANCEL: 4,
    //通知类型
    NOTICE: 1,
    MESSAGE: 2,
    //客户端类型
    CLIENT_CUSTOMER: 4,
    CLIENT_MERCHANT: 5,
    //推送
    PUSH_MSG_BODY_EMPTY: 50101, //推送消息体为空
    PUSH_USER_EMPTY: 50102, //推送目标用户为空
    PUSH_SHORT_DURATION: 50103, //推送有效时长过短
    PUSH_SERVICE_ERROR: 50104, //推送服务错误
    PUSH_DEADLINE_PASSED: 50105, //已过截止时间
    PUSH_DELAY_NOT_ALLOW: 50106, //不允许延迟
    PUSH_DUPLICATE_CONTENT: 50107, //推送参数有误，内容重复
    ACCOUNT_NOT_EXIST: 50201, //账号不存在
    //配送员分组常量
    DELIVERYER_GROUP_BOY: 1,
    DELIVERYER_GROUP_GIRL: 2,
    /* NAME_ALREADY_EXISTS: 1200, //名称已存在
    API_DATA_EMPTY: 1201,
    CANNOT_SEARCH_YOURSELF: 1204, //不能搜索自己
    MERCHANT_NOT_CREATED: 1205, //商户尚未创建
    USER_ALREADY_BOUND: 1206, //用户已被绑定
    DATA_NOT_EXIST: 1208, //数据不存在
    PRINTER_SN_ALREADY_EXISTS: 1207, //打印机序列号已存在
    UPLOAD_IMAGE_FAIL: 1502, //图片上传失败
    UPLOAD_IMAGE_VALID_FAIL: 1504, //图片上传校验失败
    NOTHING: 0,
    LOGIN_TOO_MANY_ATTEMPTS: 1601, //登录太频繁
    ACCESS_DENIED: 6781, //没有访问权限
    PRINTER_NOT_REGISTERED: 1209, //打印机尚未注册
    PRINTER_OFFLINE: 1210, //打印机离线
    PARAM_VALID_FAIL: 4222, //请求参数验证失败
    GOODS_NOT_EXIST: 42221, //商品不存在
    GOODS_OFF_SHELVE: 42222,//商品已下架
    OUT_OF_STOCK: 42228,//缺货
    LESS_THAN_MOQ: 42230, //小于起购量
    GOODS_SPEC_NOT_EXIST: 42231, //商品规格不存在
    GOODS_ATTR_ERROR: 42232, //商品规格属错误
    GREATER_THAN_TOTAL: 42233, //大于总额
    OUT_RANGE: 42234, //超出范围
    PRINT_FAIL: 42235, //打印失败
    PRINTER_NOT_FOUND: 42236, //找不到打印机
    PHONE_INCORRECT: 42239, //手机号不正确
    UNPAID_TABLE: 42301, //餐桌尚有付款订单
    TABLE_NUMBER_OCCUPIED: 42303, //桌号被占用
    MPCODE_TOO_MANY: 42304, //小程序码桌贴生成太多
    CLIENT_ERROR: 5000,//客户端错误
    UNKNOWN: -5000,//未知错误
    //升级类型
    UPGRADE_RES: 1, //资源整包升级
    UPGRADE_RES_DIFF: 2, //资源差量包升级
    UPGRADE_FULL: 3, //应用整包升级
    //打印机状态
    ONLINE: 1,
    OFFLINE: 0,
    SCENE_NORMAL: 1,
    SCENE_KITCHEN: 2,
    ENABLED: 1,
    DISABLED: 0,
    //配送方式
    TOGO: 1, // 外带(打包)
    TAKEOUT: 2, //外卖
    BOOKING: 3, // 预订
    PAYLATER: 4, //后付款
    EATIN: 5, // 堂食
 */
}
export default code